/** 
* All Rights Reserved , Copyright (C) 2023 , 青岛鼎信通讯股份有限公司
* 
* CbbPmRiskServiceAuto
* 项目风险
* 
* 修改纪录
* 2023-06-26 版本：1.0 weixinmin 创建。
* @version 版本：1.0
* @author 作者：weixinmin
* 创建日期：2023-06-26
*/

package com.topscomm.mis.cbb.pm.base.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mis.cbb.pm.base.*;
import com.topscomm.mis.cbb.pm.base.pojo.CbbPmRiskEntity;
import com.topscomm.mis.cbb.pm.base.dao.ICbbPmRiskDao;


public class CbbPmRiskServiceAuto extends BaseService<CbbPmRiskEntity,ICbbPmRiskDao> {
	
	/**
	 * @author: weixinmin
	 * @date: 2023-06-26
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("risklevel") != null) {
			temp = mapRow.get("risklevel").toString();
			mapRow.put("disprisklevel", datacodeCache.getValueDynamic("RiskLevel", temp, "code", "name"));
		}
		if (mapRow.get("status") != null) {
			temp = mapRow.get("status").toString();
			mapRow.put("dispstatus", datacodeCache.getValueDynamic("RiskStatus", temp, "code", "name"));
		}
		if (mapRow.get("attribute") != null) {
			temp = mapRow.get("attribute").toString();
			mapRow.put("dispattribute", datacodeCache.getValueDynamic("RiskAttribute", temp, "code", "name"));
		}
		if (mapRow.get("probability") != null) {
			temp = mapRow.get("probability").toString();
			mapRow.put("dispprobability", datacodeCache.getValueDynamic("RiskProbability", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "cbbPmRiskDao")
	public void setDao(IBasicDao<CbbPmRiskEntity> dao) {		
		super.setDao(dao);
	}
}
